<?php

// Configuration for library.php
class Config
{
    // Main title to display - propably in header of pages
    const TITLE = 'Gallery title';

    // Localize it.
    // one of the inc/lang files. ".php" extension will be
    // handled automatically. It tries to gues user's locale
    // if it's an empty string.
    // Example: 'en' - set english
    // Example: '' - try to set user's locale. It sets english if
    //               there isn't any.
    const LANG = 'en';

    // DIRECTORIES *********************************************
    // BASE_DIR points to the directory where are/will be stored
    // original of the images/files. These files are left untouched
    // (it's useful for archiving your collection).
    // This directory has to be readable for web server daemon.
    // It has to end with '/'
    const BASE_DIR = 'albums/';

    // THUMB_DIR points to the directory where will be stored
    // thumbnails (scaled to THUMB_WIDTH size) of the images/files.
    // This directory has to be readable and writable for web
    // server daemon.
    // It has to end with '/'
    const THUMB_DIR = 'thumbnails/';

    // DISPLAY_DIR points to the directory where will be stored
    // images scaled to the DISPLAY_WIDTH size.
    // This directory has to be readable and writable for web
    // server daemon.
    // It has to end with '/'
    const DISPLAY_DIR = 'display/';

    // PRESENTATION **********************************
    // Width of the newly created thumbnails. Height is
    // computed from this value with image size ratio
    // on mind.
    const THUMB_WIDTH = 120;

    // Width of the newly created display images. Height is
    // computed from this value with image size ratio
    // on mind.
    const DISPLAY_WIDTH = 800;

    // If it's set to true, the link to the original image
    // will be displayed for user. Originals are directly linked
    // from BASE_DIR.
    // Alowed values: true, false
    const ALLOW_ORIGINAL_IMAGES = true;

    // Try to use automatic rotation of thumbnails and display
    // images if there are required exif data for it detected.
    // Exif extension has to be installed.
    // WARNING: this feature will DEADLY slow down generation of galleries.
    //          Use it only if it's required. E.g. digikam will
    //          do it automatically. I need it for dummy iphoto...
    const IMAGE_EXIF_AUTOROTATE = true;

    // Specify file extensions of files taken as images.
    // Format: string
    const IMAGE_EXTENSIONS = 'jpg jpeg png gif tiff';

    // Specify file extensions of files taken as music files.
    // Format: string
    const MUSIC_EXTENSIONS = 'mp3 ogg flac wma';

    // Specify file extensions of files taken as videos.
    // Format: string
    const VIDEO_EXTENSIONS = 'mpeg mpg avi';
    // Note: All other files are taken as unknown binary
    // with plain text link.

    // An image taken as thumbnail for MUSIC_EXTENSIONS files.
    const MUSIC_THUMBNAIL = 'inc/audio-x-generic.png';

    // An image taken as thumbnail for VIDEO_EXTENSIONS files.
    const VIDEO_THUMBNAIL = 'inc/video-x-generic.png';

    // An image taken as thumbnail for unknown/unspecified file types.
    const BINARY_THUMBNAIL = 'inc/application-x-tar.png';

    // Display date mask of directory last modification.
    // Read php documentation for its changes.
    const DATE_DISPLAY_MASK = '%Y-%m-%d';

    // FILE GENERATORS *************************************
    // Warning: change these values at your own risk. You should
    //          understand php's chmod() file modes and umask() as well.
    //          Default values should be correct for most cases.

    // Access rights for created directories.
    const MKDIR_MASK = 0755;
    // Access rights for created files.
    const MKFILE_MASK = 0644;

    // File batch generator. Perform refresh after REFRESH_COUNT
    // of processed files. It should avoid timeout errors.
    const REFRESH_COUNT = 5;

}

?>
